package com.lanchetech.dao;

import java.util.List;

import com.lanchetech.bean.vo.AreaVO;
import org.apache.ibatis.annotations.Param;

import com.lanchetech.entity.Area;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface AreaMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Area record);

    int insertSelective(Area record);

    Area selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Area record);

    int updateByPrimaryKey(Area record);

    Area findOneByZipCodeAndLevelType(@Param("zipCode") String zipCode, @Param("levelType") Integer levelType);

    Area findOneByShortName(@Param("shortName") String shortName);

    Area findOneByMergerShortName(@Param("mergerShortName") String mergerShortName);

    List<AreaVO> findAllByParentIdAndLevelType(@Param("parentId") Long parentId, @Param("levelType") Integer levelType);

    List<Area> findAllbyIds(@Param("list") List<Long> collect);

    List<Area> findAllByParentId(@Param("parentId")Long parentId);
}